#include "key.h"
uint8 key1_status=0,key2_status=0,key3_status=0,key4_status=0;             
uint8 key1_last_status,key2_last_status,key3_last_status,key4_last_status;  
uint8 key1_flag,key2_flag,key3_flag,key4_flag;
uint16 count=0;
void Key_procces(void)
{

    key1_last_status = key1_status;
    key2_last_status = key2_status;
    key3_last_status = key3_status;
    key4_last_status = key4_status;

    key1_status =  KEY1;
    key2_status =  KEY2;
    key3_status =  KEY3;
    key4_status =  KEY4;
    if(key1_status && !key1_last_status)    key1_flag = 1;
    if(key2_status && !key2_last_status)    key2_flag = 1;
    if(key3_status && !key3_last_status)    key3_flag = 1;
    if(key4_status && !key4_last_status)    key4_flag = 1;



if(key4_flag)  //
{
    key4_flag = 0;
}
if(key3_flag)  //
{
    key3_flag = 0;
    count++;
 
}
if(key2_flag) 
{
    key2_flag = 0;

  
}
if(key1_flag)  
{
 
    key1_flag = 0;

}

}
